public class 静态内部类 {
    public static void main(String[] args) {
        OuterClass2.InnerClass innerClass = new OuterClass2.InnerClass();
        //就相当于外部类的静态成员,就和类中的静态成员变量一样,都是通过类名来调用
    }

}

class OuterClass2{
    public int data1 = 1;
    private final int data2 = 2;
    public static int data3 = 3;
    /*
    静态内部类
     */

    public void test() {
        System.out.println("OutClass2::test()");
    }
        static class InnerClass{

            public int data4 = 4;
            private final int data5 = 5;
            public static int data6 = 6;

            public void test(){
                System.out.println("InnerClass::test()");
            }
    }
}
